<!DOCTYPE html>
<html>
	<head>
		<?php require FCPATH . 'application/views/header.php'; ?>
	</head>
    <body>
        <div id="z-body-container">
				<?php require file_exists($path = FCPATH . "application/views/backend/{$l_template}.php") ? $path : 'error.php'; ?>
        </div>
		<?php if (count($l_javascript_variables)):?>
			<script type="text/javascript">
				<?php foreach ($l_javascript_variables as $key => $value): ?>
					<?php echo "window.{$key} = {$value};\n"; ?>
				<?php endforeach;?>
			</script>
		<?php endif; ?>
		<?php if (count($l_javascripts)): ?>
			<?php foreach ($l_javascripts as $js): ?>
				<?php if (preg_match("/^http:\/\//", $js)): ?>
					<script type="text/javascript" rel="" src="<?php echo $js; ?>.js"></script>
				<?php else: ?>
					<script type="text/javascript" rel="" src="/assets/js/<?php echo $js; ?>.js"></script>
				<?php endif; ?>
			<?php endforeach; ?>
		<?php endif; ?>
    </body>
</html>
